/**
 * [217] 存在重复元素
 *
 * @format
 * @lc app=leetcode.cn id=217 lang=javascript
 */

// @lc code=start
/**
 * @param {number[]} nums
 * @return {boolean}
 */
var containsDuplicate = function (nums) {
    const dict = {}
    for (let i = 0; i < nums.length; i++) {
        if (dict[nums[i]]) return true
        else dict[nums[i]] = true
    }
    return false
}
// @lc code=end
